package fr.kirin.logger.filter;

import javax.swing.JComponent;

import fr.kirin.logger.model.LoggerTreeModel;



/**
 *Default implmentation of the filter GUI, it provide method for registering model. 
 * 
 * @author kirin
 *
 */
public abstract class AbstractFilterGUI implements FilterGUI
{
    
    private final  TreeFilter filter;
    protected LoggerTreeModel model;
    
    
    /**
     *Construct a GUI filter with  a TreeFilter. 
     * 
     * @param filter
     */
    public AbstractFilterGUI(TreeFilter filter){
        this.filter = filter;
    }
    
    /* (non-Javadoc)
	 * @see fr.kirin.logger.model.gui.FilterGUI#registerModel(fr.kirin.logger.model.LoggerTreeModel)
	 */
    public void registerModel(LoggerTreeModel model){
        this.model = model;
    }

    /* (non-Javadoc)
	 * @see fr.kirin.logger.model.gui.FilterGUI#getGUI()
	 */
    public abstract JComponent getGUI();
    
    /* (non-Javadoc)
	 * @see fr.kirin.logger.model.gui.FilterGUI#getFilter()
	 */
    public TreeFilter getFilter(){
        return filter;
    }


}
